package com.earthchen.demo.service.impl;

import com.earthchen.core.support.shiro.provider.ShiroFilterRulesProvider;
import com.earthchen.core.support.shiro.rule.RolePermRule;
import com.earthchen.demo.dao.SysResourceDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author earthchen
 * @date 2018/9/6
 **/
@Service("shiroFilterRulesProvider")
public class ShiroFilterRulesProviderImpl implements ShiroFilterRulesProvider {

    @Autowired
    private SysResourceDao sysResourceDao;

    @Override
    public List<RolePermRule> loadRolePermRules() {
        return sysResourceDao.selectRoleRules();
    }
}
